solve non linear system of equatoins